﻿using Abp.AutoMapper;
using System.ComponentModel.DataAnnotations;

namespace FutureApp.Orders.Dto
{
    /// <summary>
    /// 创建输入参数DTO
    /// </summary>
    [AutoMapTo(typeof(OrderHead))]
    public class CreateOrderHeadInput
    {
        /// <summary>
        /// 属性的最大长度
        /// </summary>
        public const int MaxNameLength = 50;
        /// <summary>
        /// 商品名称
        /// </summary>
        [Required(ErrorMessage = "商品名称不能为空")]
        [StringLength(MaxNameLength)]
        public virtual string GoodName { get; set; }
        /// <summary>
        /// 商品价格
        /// </summary>
        [Required(ErrorMessage = "商品价格不能为空")]
        public virtual double GoodPrice { get; set; }
        /// <summary>
        /// 选择分期
        /// </summary>
        [Required(ErrorMessage = "分期数不能为空")]
        public virtual int? Nums { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [Required(ErrorMessage = "姓名不能为空")]
        [StringLength(MaxNameLength)]
        public virtual string SellName { get; set; }
        /// <summary>
        /// 身份证
        /// </summary>
        [Required(ErrorMessage = "身份证不能为空")]
        [StringLength(15)]
        public virtual string SellIdentity { get; set; }
        /// <summary>
        /// 居住地址
        /// </summary>
        [Required(ErrorMessage = "居住地址不能为空")]
        [StringLength(MaxNameLength)]
        public virtual string HomeAddress { get; set; }
        /// <summary>
        /// 工作单位
        /// </summary>
        [Required(ErrorMessage = "工作单位不能为空")]
        [StringLength(MaxNameLength)]
        public virtual string Company { get; set; }
        /// <summary>
        /// 工作单位地址
        /// </summary>
        [Required(ErrorMessage = "工作单位地址不能为空")]
        [StringLength(MaxNameLength)]
        public virtual string CompanyAddress { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [Required(ErrorMessage = "手机号不能为空")]
        [StringLength(11)]
        public virtual string SellTelephone { get; set; }
        /// <summary>
        /// 银行卡号
        /// </summary>
        [Required(ErrorMessage = "银行卡号不能为空")]
        [StringLength(MaxNameLength)]
        public virtual string SellCard { get; set; }
        /// <summary>
        ///订单类型：1审核中，2已通过审核，3未通过审核，4订单作废
        /// </summary>      
        public const int Type = 1;
    }
}